@servers(['localhost' => '127.0.0.1'])

@include('vendor/autoload.php')

@setup
    $branch = env('APP_BRANCH')
@endsetup

@story('server', ['confirm' => true])
    git
    migrate
@endstory

@story('server-composer', ['confirm' => true])
    git
    composer
    migrate
@endstory

@task('git')
    git pull origin {{ $branch }}
@endtask

@task('migrate')
    php artisan migrate
@endtask

@task('composer')
    composer update
@endtask

@task('queue')
    supervisorctl restart all
@endtask

@task('npm')
    cnpm install
@endtask